package com.sxf.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.sxf.domain.blog.Post;
import com.sxf.domain.blog.PostMeta;
import com.sxf.domain.viewbean.PostVO;
import com.sxf.mybatis.page.Pagination;
import com.sxf.querybean.PostQuery;

public interface PostService {

	public Pagination<PostVO> queryPage(PostQuery query);

	public List<PostVO> queryList(PostQuery query);

	public PostVO queryOne(PostQuery query);

	public long queryNumber(PostQuery query);

	public Map<String, Integer> queryStatistic();

	public int insert(Post post);

	public int update(Post post);

	public int delete(Post post);

	/**
	 * 归档日期数据
	 * 
	 * @return
	 */
	public List<Date> getArchivePost();

	/**
	 * 返回主键或影响的行数
	 * 
	 * @param postMeta
	 * @return
	 */
	public long insertPostMeta(PostMeta postMeta);

	public int updatePostMeta(PostMeta postMeta);

	public int deletePostMeta(PostMeta postMeta);
}
